<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	 主要完成单位情况
</div>

<table id="organizations" class="table01" border="0" width="100%"
	cellspacing="0" cellpadding="0">
	<thead>
		<tr>
			<th width="7%" align="center">序号</th>
			<th width="20%" align="center">单位名称</th>
			<th width="20%" align="center">联系人</th>
			<th width="17%" align="center">联系电话</th>
			<th width="19%" align="center">邮箱</th>
			<th width="17%" align="center">传真</th>
		</tr>
	</thead>
	<tbody>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/organizations/organization" var="situation">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center">
					<input type="radio" onclick="setSubmitPsn2();" name="organizations_seq"  style="display:none"/>
					<c:if test="${index==0}">
						<input type="hidden" id="submit_psn" name="organizations/organization[${flag}${index}]@submit_psn" value="1" />
					</c:if>
					<span name="organizations/organization[${flag}${index}]@seq_no">${index+1}</span>
				</td>
				<td align="center">
					<security:authorize ifNotGranted="A_AUTH_PSZJ">
						<span label="单位名称" class="required " name="organizations/organization[${flag}${index}]/org_name">
							<a href="#" class="yase" onclick="orgInfoView(this,'organizations')"><x:out select="$situation/org_name" /></a>
						</span>
					</security:authorize>
					<security:authorize ifAnyGranted="A_AUTH_PSZJ">
					******
					</security:authorize>
				</td>
				<td align="center">
					<security:authorize ifNotGranted="A_AUTH_PSZJ">
						<span label="联系人" class="required " name="organizations/organization[${flag}${index}]/contact_name">
							<x:out select="$situation/contact_name" /> 
						</span>
					</security:authorize>
					<security:authorize ifAnyGranted="A_AUTH_PSZJ">
					******
					</security:authorize>
				</td>
				<td align="center">
					<security:authorize ifNotGranted="A_AUTH_PSZJ">
						<span label="联系电话" class="required " name="organizations/organization[${flag}${index}]/org_tel">
							<x:out select="$situation/org_tel" />
						</span>
					</security:authorize>
					<security:authorize ifAnyGranted="A_AUTH_PSZJ">
					******
					</security:authorize>
				</td>
				<td align="center">
					<security:authorize ifNotGranted="A_AUTH_PSZJ">
						<span label="邮箱" class="required " name="organizations/organization[${flag}${index}]/email">
							<x:out select="$situation/email" />
						</span>
					</security:authorize>
					<security:authorize ifAnyGranted="A_AUTH_PSZJ">
					******
					</security:authorize>
				</td>
				<td align="center">
					<security:authorize ifNotGranted="A_AUTH_PSZJ">
						<span label="传真" class="" name="organizations/organization[${flag}${index}]/fax2">
							<x:out select="$situation/fax2" />
						</span>
					</security:authorize>
					<security:authorize ifAnyGranted="A_AUTH_PSZJ">
					******
					</security:authorize>
				</td>
				<input type="hidden" label="单位性质" class="required " name="organizations/organization[${flag}${index}]/nature_name"
					value="<x:out select="$situation/nature_name" />" />
				<input type="hidden" label="单位性质"  name="organizations/organization[${flag}${index}]/nature_value"
					value="<x:out select="$situation/nature_value" />" />
				<input type="hidden" label="邮编" class="required " name="organizations/organization[${flag}${index}]/zip_code"
					value="<x:out select="$situation/zip_code" />" />
				<input type="hidden" label="地址" class="required " name="organizations/organization[${flag}${index}]/address"
					value="<x:out select="$situation/address" />" />
				<input type="hidden" label="主要贡献" class="required " name="organizations/organization[${flag}${index}]/main_contribution2"
					value="<x:out select="$situation/main_contribution2" />" />
				<input type="hidden" label="主要贡献 hidden" name="organizations/organization[${flag}${index}]/main_contribution2_hidden"
					value="<x:out select="$situation/main_contribution2_hidden" />" />
					
					<input type="hidden" label="法定代表人"  class="required " name="organizations/organization[${flag}${index}]/faren_name"
					value="<x:out select="$situation/faren_name" />" />
					<input type="hidden" label="移动电话"  class="required " name="organizations/organization[${flag}${index}]/contact_mobile"
					value="<x:out select="$situation/contact_mobile" />" />
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>

	</tbody>

</table>

<br/>

<div id="text2" style="display: none">
<div class="t_bar">完成单位合作关系说明</div>
<table class="t_css" width="100%" border="0" cellpadding="0" id="uint_cooperation_introduction" cellspacing="1" style="table-layout:fixed;">
	<col width="20%;"/>
	<col width="25%;"/>
	<col width="20%;"/>
	<col width="20%;"/>
	<col width="25%;"/>
	<tr class="li_2">
		<td  colspan="5" >
			<x:out select="$xmlData/data/proposal/uint_cooperation_relationship_introduction_hidden" escapeXml="false"/>
		</td>
	</tr>
</table>
</div>




<script type="text/javascript">
$(document).ready(function(){
	var text= $("#organizations").find("tr:last").find("span[name$='@seq_no']").text();
	   text = parseInt(text);
	   if (text >= 2){
		   $("#text2").show();
	   }else{
		   $("#text2").hide();
		   }
})

</script>





<script type="text/javascript">

function orgInfoView(obj,tableId,titleName) {
	var url = ctx+"/proposal/2014/view/dialog/orgInfoView_kxjstjs_dgzywcdw_2016?parentTab="+tableId+"&type=edit&TB_iframe=true&height=460&width=910";
	$(obj).parents("tr").find(":radio").attr("checked",true);	
	if(!$("#"+tableId+" :radio:checked").length>0){
		scmWarn(irisNotes.pleaseSelectARow);
		return false;
	}
	
	if(url!=null&&url!=""){
		// showThickBox(url,irisNotes.viewResearcherInformation);
		var title=irisNotes.viewResearcherInformation;
		if (titleName != undefined)
		{
			title = titleName;
		}
		tb_show('查看完成单位信息',url,false);
	}
}
</script>




